
/*
Description:
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.

Example 1:

Input: [[1,1],[2,2],[3,3]]
Output: 3
Explanation:
^
|
|        o
|     o
|  o
+------------->
0  1  2  3  4

Example 2:

Input: [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]]
Output: 4
Explanation:
^
|
|  o
|     o        o
|        o
|  o        o
+------------------->
0  1  2  3  4  5  6
*/

#include <iostream>
#include <string>
#include <vector>
using namespace std;

/**
* Definition for a point.
*/
struct Point {
    int x;
    int y;
    Point() : x(0), y(0) {}
    Point(int a, int b) : x(a), y(b) {}
	void Print() { cout << "x:" << x << " y:" << y << endl; }
};

class Solution {
public:
	int maxPoints(vector<Point>& points) {
		int num = 0;

		//tuple<x, y, line>;

		//first: find any two points set

		//calc lines

		//group by line

		return num;
	}
};

int _maxPoints()
{
	vector<Point> points {{1, 1}, { 2, 2 }, { 3, 3 }};
	Solution solu;
	int num;

	num = solu.maxPoints(points);

	cout << "points: " << endl;
	for (auto p : points) p.Print();
	cout << "num: " << num << endl;
	return 0;
}